Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports DigiOffice.Integration.TBIXchangeAzure.Messages
Imports IDB.API.DTO.Document
Namespace Global
Namespace DigiOffice.Integration.TBIXchangeAzure.Messages
Public Partial Class DocumentMessage
Public Overridable Property Header As Header
Public Overridable Property EventType As eventType
Public Overridable Property Document As Document
Public Enum eventType
Update
Create
Delete
Response
End Enum
End Class
Public Partial Class DocumentRequestMessage
Public Overridable Property Header As Header
Public Overridable Property RootDocumentID As String
Public Overridable Property IncludePhysicalFile As Boolean
End Class
Public Partial Class Header
Public Overridable Property MessageID As String
Public Overridable Property Timestamp As Date
Public Overridable Property Sender As Party
Public Overridable Property Recipient As Party
Public Overridable Property RequestMessageID As Object
Public Partial Class Party
Public Overridable Property Title As String
Public Overridable Property Code As String
Public Overridable Property Version As String
Public Overridable Property Environment As Environment
End Class
Public Partial Class Environment
Public Overridable Property Title As String
Public Overridable Property Code As String
End Class
End Class
Public Partial Class ProcessDocumentRequestMessage
Public Overridable Property InstanceId As Guid
Public Overridable Property DocumentRequest As DocumentRequestMessage
End Class
End Namespace
Namespace IDB.API.DTO.Document
Public Partial Class Document
Implements ICustomProperties
Public Sub New()
CustomProperties = New Dictionary(Of String, Object)
End Sub
Public Overridable Property ID As Guid
Public Overridable Property RootDocumentID As Guid
Public Overridable Property RegistrationprofileID As Guid
Public Overridable Property Title As String
Public Overridable Property FullTitle As String
Public Overridable Property Number As String
Public Overridable Property Version As String
Public Overridable Property ExternalNumber As String
Public Overridable Property ExternalVersion As String
Public Overridable Property InternalNumber As String
Public Overridable Property InternalInvoiceNumber As String
Public Overridable Property PersonID As Integer
Public Overridable Property RelationID As Integer
Public Overridable Property RelationTitle As String
Public Overridable Property ProjectID As Integer
Public Overridable Property ProjectTitle As String
Public Overridable Property Extension As String
Public Overridable Property [Date] As Nullable(Of Date)
Public Overridable Property CommentsCount As Integer
Public Overridable Property HasComments As Boolean
Public Overridable Property HasPreview As Boolean
Public Overridable Property ExtraField As String
Public Overridable Property IsFavorite As Boolean
Public Overridable Property DocumentcategoryText As String
Public Overridable Property FileSize As Nullable(Of Long)
Public Overridable Property FileDate As Nullable(Of Date)
Public Overridable Property Hash As String
Public Overridable Property HashType As String
Public Overridable Property FileUrl As String
Public Overridable Property StandardDocumentUrl As String
Public Overridable Property IsCorporateIdentity As Boolean
Public Overridable Property UserTitle As String
Public Overridable Property IsFrozen As Boolean
Public Overridable Property InternalCompanyID As Integer
Public Overridable Property DirectUrl As String
Public Overridable Property AllowDigitalSigningOnlyOnPrimaryVersions As Boolean
Public Overridable Property IsPrimaryVersion As Boolean
Public Overridable Property FileExtension As String
Public Overridable Property CustomProperties As Dictionary(Of String, Object)
End Class
End Namespace
End Namespace
VB.NET ProcessDocumentRequestMessage DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/ProcessDocumentRequestMessage HTTP/1.1
Host: kpm_digiofficeapigateway.tbi.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
DocumentRequest:
{
Header:
{
MessageID: String,
Timestamp: 0001-01-01,
Sender:
{
Title: String,
Code: String,
Version: String,
Environment:
{
Title: String,
Code: String
}
},
Recipient:
{
Title: String,
Code: String,
Version: String,
Environment:
{
Title: String,
Code: String
}
},
RequestMessageID: {}
},
RootDocumentID: String,
IncludePhysicalFile: False
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Header:
{
MessageID: String,
Timestamp: 0001-01-01,
Sender:
{
Title: String,
Code: String,
Version: String,
Environment:
{
Title: String,
Code: String
}
},
Recipient:
{
Title: String,
Code: String,
Version: String,
Environment:
{
Title: String,
Code: String
}
},
RequestMessageID: {}
},
EventType: Update,
Document:
{
GlobalID: String,
RootDocumentID: String,
Code: String,
Subject: String,
VersionNumber: String,
NewestVersion: False,
RelationReference:
{
GlobalID: String,
Title: String
},
DocumentTypeReference:
{
GlobalID: String,
Title: String
},
ProjectReference:
{
GlobalID: String,
Title: String
},
ConstructionBlockReference:
{
GlobalID: String,
Title: String
},
ConstructionNumberReference:
{
GlobalID: String,
Title: String
},
HousingTypeReference:
{
GlobalID: String,
Title: String
},
Floor: 0,
FloorSpecified: False,
DeletedDate: 0001-01-01,
DeletedDateSpecified: False,
File:
{
Type: String,
Name: String,
Size: 0,
Content: String,
ModifiedDate: 0001-01-01
},
CustomFields:
[
{
Name: String,
Value: String
}
],
CreationDate: 0001-01-01,
CreatedBy: String,
ModifiedDate: 0001-01-01,
ModifiedBy: String
}
}